Optimal. Leaf size=163 \[ \frac {i (e+f x)^3}{a d}-\frac {i (e+f x)^4}{4 a f}-\frac {6 i f (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d^2}-\frac {12 i f^2 (e+f x) \text {PolyLog}\left (2,-i e^{c+d x}\right )}{a d^3}+\frac {12 i f^3 \text {PolyLog}\left (3,-i e^{c+d x}\right )}{a d^4}+\frac {i (e+f x)^3 \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.310, Rules used = {5676, 32, 3399,
4269, 3797, 2221, 2611, 2320, 6724} \begin {gather*} \frac {12 i f^3 \text {Li}_3\left (-i e^{c+d x}\right )}{a d^4}-\frac {12 i f^2 (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^3}-\frac {6 i f (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d^2}+\frac {i (e+f x)^3 \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{a d}+\frac {i (e+f x)^3}{a d}-\frac {i (e+f x)^4}{4 a f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 2221
Rule 2320
Rule 2611
Rule 3399
Rule 3797
Rule 4269
Rule 5676
Rule 6724
Rubi steps
\begin {align*} \int \frac {(e+f x)^3 \sinh (c+d x)}{a+i a \sinh (c+d x)} \, dx &=i \int \frac {(e+f x)^3}{a+i a \sinh (c+d x)} \, dx-\frac {i \int (e+f x)^3 \, dx}{a}\\ &=-\frac {i (e+f x)^4}{4 a f}+\frac {i \int (e+f x)^3 \csc ^2\left (\frac {1}{2} \left (i c+\frac {\pi }{2}\right )+\frac {i d x}{2}\right ) \, dx}{2 a}\\ &=-\frac {i (e+f x)^4}{4 a f}+\frac {i (e+f x)^3 \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}-\frac {(3 i f) \int (e+f x)^2 \coth \left (\frac {c}{2}-\frac {i \pi }{4}+\frac {d x}{2}\right ) \, dx}{a d}\\ &=\frac {i (e+f x)^3}{a d}-\frac {i (e+f x)^4}{4 a f}+\frac {i (e+f x)^3 \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}+\frac {(6 f) \int \frac {e^{2 \left (\frac {c}{2}+\frac {d x}{2}\right )} (e+f x)^2}{1+i e^{2 \left (\frac {c}{2}+\frac {d x}{2}\right )}} \, dx}{a d}\\ &=\frac {i (e+f x)^3}{a d}-\frac {i (e+f x)^4}{4 a f}-\frac {6 i f (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d^2}+\frac {i (e+f x)^3 \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}+\frac {\left (12 i f^2\right ) \int (e+f x) \log \left (1+i e^{2 \left (\frac {c}{2}+\frac {d x}{2}\right )}\right ) \, dx}{a d^2}\\ &=\frac {i (e+f x)^3}{a d}-\frac {i (e+f x)^4}{4 a f}-\frac {6 i f (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d^2}-\frac {12 i f^2 (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^3}+\frac {i (e+f x)^3 \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}+\frac {\left (12 i f^3\right ) \int \text {Li}_2\left (-i e^{2 \left (\frac {c}{2}+\frac {d x}{2}\right )}\right ) \, dx}{a d^3}\\ &=\frac {i (e+f x)^3}{a d}-\frac {i (e+f x)^4}{4 a f}-\frac {6 i f (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d^2}-\frac {12 i f^2 (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^3}+\frac {i (e+f x)^3 \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}+\frac {\left (12 i f^3\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{2 \left (\frac {c}{2}+\frac {d x}{2}\right )}\right )}{a d^4}\\ &=\frac {i (e+f x)^3}{a d}-\frac {i (e+f x)^4}{4 a f}-\frac {6 i f (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d^2}-\frac {12 i f^2 (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^3}+\frac {12 i f^3 \text {Li}_3\left (-i e^{c+d x}\right )}{a d^4}+\frac {i (e+f x)^3 \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.20, size = 247, normalized size = 1.52 \begin {gather*} \frac {-i x \left (4 e^3+6 e^2 f x+4 e f^2 x^2+f^3 x^3\right )-\frac {8 f \left (d^2 \left (-i d e^c x \left (3 e^2+3 e f x+f^2 x^2\right )+3 \left (1+i e^c\right ) (e+f x)^2 \log \left (1+i e^{c+d x}\right )\right )+6 d \left (1+i e^c\right ) f (e+f x) \text {PolyLog}\left (2,-i e^{c+d x}\right )-6 i \left (-i+e^c\right ) f^2 \text {PolyLog}\left (3,-i e^{c+d x}\right )\right )}{d^4 \left (-i+e^c\right )}+\frac {8 i (e+f x)^3 \sinh \left (\frac {d x}{2}\right )}{d \left (\cosh \left (\frac {c}{2}\right )+i \sinh \left (\frac {c}{2}\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )}}{4 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 512 vs. \(2 (142 ) = 284\).
time = 1.55, size = 513, normalized size = 3.15
method | result | size |
risch | \(\frac {12 i f^{3} \polylog \left (3, -i {\mathrm e}^{d x +c}\right )}{a \,d^{4}}+\frac {6 i e \,f^{2} c^{2}}{a \,d^{3}}+\frac {6 i f^{3} c^{2} \ln \left (1+i {\mathrm e}^{d x +c}\right )}{a \,d^{4}}+\frac {6 i e \,f^{2} x^{2}}{a d}+\frac {6 i f^{3} c^{2} \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{4}}-\frac {6 i \ln \left ({\mathrm e}^{d x +c}-i\right ) e^{2} f}{a \,d^{2}}-\frac {12 i e \,f^{2} \ln \left (1+i {\mathrm e}^{d x +c}\right ) c}{a \,d^{3}}+\frac {12 i e \,f^{2} c x}{a \,d^{2}}-\frac {12 i e \,f^{2} c \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{3}}+\frac {12 i e \,f^{2} c \ln \left ({\mathrm e}^{d x +c}-i\right )}{a \,d^{3}}-\frac {12 i e \,f^{2} \ln \left (1+i {\mathrm e}^{d x +c}\right ) x}{a \,d^{2}}-\frac {6 i f^{3} \ln \left (1+i {\mathrm e}^{d x +c}\right ) x^{2}}{a \,d^{2}}+\frac {6 i \ln \left ({\mathrm e}^{d x +c}\right ) e^{2} f}{a \,d^{2}}-\frac {6 i f^{3} c^{2} \ln \left ({\mathrm e}^{d x +c}-i\right )}{a \,d^{4}}-\frac {6 i f^{3} c^{2} x}{a \,d^{3}}-\frac {12 i f^{3} \polylog \left (2, -i {\mathrm e}^{d x +c}\right ) x}{a \,d^{3}}-\frac {12 i e \,f^{2} \polylog \left (2, -i {\mathrm e}^{d x +c}\right )}{a \,d^{3}}-\frac {2 \left (f^{3} x^{3}+3 e \,f^{2} x^{2}+3 e^{2} f x +e^{3}\right )}{d a \left ({\mathrm e}^{d x +c}-i\right )}-\frac {i f^{3} x^{4}}{4 a}-\frac {i e^{3} x}{a}-\frac {i e^{4}}{4 a f}-\frac {i f^{2} e \,x^{3}}{a}-\frac {3 i f \,e^{2} x^{2}}{2 a}+\frac {2 i f^{3} x^{3}}{a d}-\frac {4 i f^{3} c^{3}}{a \,d^{4}}\) | \(513\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 321 vs. \(2 (136) = 272\).
time = 0.36, size = 321, normalized size = 1.97 \begin {gather*} \frac {3}{2} \, f {\left (\frac {-i \, d x^{2} + {\left (d x^{2} e^{c} - 4 \, x e^{c}\right )} e^{\left (d x\right )}}{i \, a d e^{\left (d x + c\right )} + a d} - \frac {4 i \, \log \left ({\left (e^{\left (d x + c\right )} - i\right )} e^{\left (-c\right )}\right )}{a d^{2}}\right )} e^{2} - {\left (\frac {i \, {\left (d x + c\right )}}{a d} + \frac {2}{{\left (a e^{\left (-d x - c\right )} + i \, a\right )} d}\right )} e^{3} - \frac {d f^{3} x^{4} + 24 \, f^{2} x^{2} e + 4 \, {\left (d f^{2} e + 2 \, f^{3}\right )} x^{3} + {\left (i \, d f^{3} x^{4} e^{c} + 4 i \, d f^{2} x^{3} e^{\left (c + 1\right )}\right )} e^{\left (d x\right )}}{4 \, {\left (a d e^{\left (d x + c\right )} - i \, a d\right )}} - \frac {12 i \, {\left (d x \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right )\right )} f^{2} e}{a d^{3}} - \frac {6 i \, {\left (d^{2} x^{2} \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + 2 \, d x {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) - 2 \, {\rm Li}_{3}(-i \, e^{\left (d x + c\right )})\right )} f^{3}}{a d^{4}} - \frac {2 \, {\left (-i \, d^{3} f^{3} x^{3} - 3 i \, d^{3} f^{2} x^{2} e\right )}}{a d^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 455 vs. \(2 (136) = 272\).
time = 0.42, size = 455, normalized size = 2.79 \begin {gather*} -\frac {d^{4} f^{3} x^{4} - 8 \, c^{3} f^{3} + 48 \, {\left (d f^{3} x + d f^{2} e + {\left (i \, d f^{3} x + i \, d f^{2} e\right )} e^{\left (d x + c\right )}\right )} {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) + 4 \, {\left (d^{4} x + 2 \, d^{3}\right )} e^{3} + 6 \, {\left (d^{4} f x^{2} - 4 \, c d^{2} f\right )} e^{2} + 4 \, {\left (d^{4} f^{2} x^{3} + 6 \, c^{2} d f^{2}\right )} e - {\left (-i \, d^{4} f^{3} x^{4} + 8 i \, d^{3} f^{3} x^{3} + 8 i \, c^{3} f^{3} - 4 i \, d^{4} x e^{3} - 6 \, {\left (i \, d^{4} f x^{2} - 4 i \, d^{3} f x - 4 i \, c d^{2} f\right )} e^{2} - 4 \, {\left (i \, d^{4} f^{2} x^{3} - 6 i \, d^{3} f^{2} x^{2} + 6 i \, c^{2} d f^{2}\right )} e\right )} e^{\left (d x + c\right )} + 24 \, {\left (c^{2} f^{3} - 2 \, c d f^{2} e + d^{2} f e^{2} + {\left (i \, c^{2} f^{3} - 2 i \, c d f^{2} e + i \, d^{2} f e^{2}\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 24 \, {\left (d^{2} f^{3} x^{2} - c^{2} f^{3} + 2 \, {\left (d^{2} f^{2} x + c d f^{2}\right )} e + {\left (i \, d^{2} f^{3} x^{2} - i \, c^{2} f^{3} + 2 \, {\left (i \, d^{2} f^{2} x + i \, c d f^{2}\right )} e\right )} e^{\left (d x + c\right )}\right )} \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + 48 \, {\left (-i \, f^{3} e^{\left (d x + c\right )} - f^{3}\right )} {\rm polylog}\left (3, -i \, e^{\left (d x + c\right )}\right )}{4 \, {\left (a d^{4} e^{\left (d x + c\right )} - i \, a d^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {- 2 e^{3} - 6 e^{2} f x - 6 e f^{2} x^{2} - 2 f^{3} x^{3}}{a d e^{c} e^{d x} - i a d} - \frac {i \left (\int \left (- \frac {i d e^{3}}{e^{c} e^{d x} - i}\right )\, dx + \int \frac {6 i e^{2} f}{e^{c} e^{d x} - i}\, dx + \int \frac {6 i f^{3} x^{2}}{e^{c} e^{d x} - i}\, dx + \int \left (- \frac {i d f^{3} x^{3}}{e^{c} e^{d x} - i}\right )\, dx + \int \frac {12 i e f^{2} x}{e^{c} e^{d x} - i}\, dx + \int \frac {d e^{3} e^{c} e^{d x}}{e^{c} e^{d x} - i}\, dx + \int \left (- \frac {3 i d e f^{2} x^{2}}{e^{c} e^{d x} - i}\right )\, dx + \int \left (- \frac {3 i d e^{2} f x}{e^{c} e^{d x} - i}\right )\, dx + \int \frac {d f^{3} x^{3} e^{c} e^{d x}}{e^{c} e^{d x} - i}\, dx + \int \frac {3 d e f^{2} x^{2} e^{c} e^{d x}}{e^{c} e^{d x} - i}\, dx + \int \frac {3 d e^{2} f x e^{c} e^{d x}}{e^{c} e^{d x} - i}\, dx\right )}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {sinh}\left (c+d\,x\right )\,{\left (e+f\,x\right )}^3}{a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________